package net.sk.china.platform.service.system;

import com.baomidou.mybatisplus.extension.service.IService;
import net.sk.china.platform.model.system.SystemNotification;
import net.sk.china.platform.request.notification.NotificationInfoRequest;
import net.sk.china.platform.request.notification.NotificationSearchRequest;
import net.sk.china.platform.request.notification.NotificationUpdateRequest;
import net.sk.china.platform.response.NotificationInfoResponse;

import java.util.List;

/**
 * SystemNotificationService 接口
 * +----------------------------------------------------------------------
 * // | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * // +----------------------------------------------------------------------
 * // | Copyright (c) 2018-2024 聊来 All rights reserved.
 * // +----------------------------------------------------------------------
 * // | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * // +----------------------------------------------------------------------
 * // | @Author: 聊来 <18970881148@qq.com>
 * // +----------------------------------------------------------------------
 * // | DateTime: 2024/6/3 17:14
 * // +----------------------------------------------------------------------
 */
public interface SystemNotificationService extends IService<SystemNotification> {


    /**
     * 系统通知列表
     * @param request 查询对象
     * @return {@code List<SystemNotification>}
     */
    List<SystemNotification> getList(NotificationSearchRequest request);

    /**
     * 公众号模板开关
     * @param id 通知id
     * @return {@code boolean}
     */
    boolean wechatSwitch(Integer id);

    /**
     * 小程序订阅模板开关
     * @param id 通知id
     * @return {@code boolean}
     */
    Boolean routineSwitch(Integer id);

    /**
     * 发送短信开关
     * @param id 通知id
     * @return {@code boolean}
     */
    Boolean smsSwitch(Integer id);

    /**
     * 通知详情
     * @param request 详情请求参数
     * @return {@code NotificationInfoResponse}
     */
    NotificationInfoResponse getDetail(NotificationInfoRequest request);

    /**
     * 根据标识查询信息
     * @param mark 标识
     * @return {@code SystemNotification}
     */
    SystemNotification getByMark(String mark);

    /**
     * 获取微信相关列表
     * @param type routine-小程序，public-公众号
     * @return {@code  List<SystemNotification>}
     */
    List<SystemNotification> getListByWechat(String type);

    /**
     * 修改通知
     * @param request 请求参数
     * @return {@code Boolean}
     */
    Boolean modify(NotificationUpdateRequest request);
}

